package com.hmall.mapper;

import com.hmall.model.SysUserDept;
import com.hmall.util.MyMapper;
import com.hmall.vo.SysDeptVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface SysUserDeptMapper extends MyMapper<SysUserDept> {
    //用户id查询部门
    SysDeptVo selectDeptByUserId(@Param("userId")Integer userId);
    Integer deleteByUserId(@Param("user_id") Integer user_id);

    SysUserDept selectByUserId(@Param("user_id")Integer user_id);

    void deleteByUserIdAndDeptId(@Param("user_id") Integer user_id,@Param("dept_id") Integer dept_id);

    Integer checkBinding(@Param("username") String username,@Param("dept_id") Integer dept_id);
}